/**
 * Copyright (c) 2011 - 2012 National Library of Medicine
 *
 * Contact: tomasz.adamusiak@nih.gov
 * 
 * This file is part of LOwlINC
 * 
 * LOwlINC is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 * 
 * LOwlINC is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along
 * with LOwlINC. If not, see <http://www.gnu.org/licenses/>.
 */
package gov.nih.nlm.lowlinc.bean;

import gov.nih.nlm.lowlinc.accessionwrapper.ConceptID;
import gov.nih.nlm.lowlinc.accessionwrapper.LOINCPartID;
import gov.nih.nlm.lowlinc.accessionwrapper.SNOMEDTermID;
import gov.nih.nlm.lowlinc.accessionwrapper.UMLScui;
import gov.nih.nlm.lowlinc.owlapi.LowlincException;

/**
 * @author Tomasz Adamusiak
 * 
 */
public class MRCONSOBean {

	private String CUI;
	private String SAB;
	private String CODE;
	private String SUPPRESS;

	public UMLScui getCUI() throws LowlincException {
		return new UMLScui(CUI);
	}

	public void setCUI(String cUI) {
		CUI = cUI;
	}

	public String getSAB() {
		return SAB;
	}

	public void setSAB(String sAB) {
		SAB = sAB;
	}

	public ConceptID getID() throws LowlincException {
		if (isSNOMED())
			return new SNOMEDTermID(getCODE());
		else
			return new LOINCPartID(getCODE());

	}

	public void setCODE(String cODE) {
		CODE = cODE;
	}

	private String getCODE(){
		return CODE;
	}

	public boolean isObsolete() {
		if (getSUPPRESS().equals("N")) {
			return false;
		} else {
			return true;
		}
	}

	public boolean isLOINCPart() {
		if (getSAB().equals("LNC") && getCODE().startsWith("LP")) {
			return true;
		} else {
			return false;
		}
	}

	public boolean isSNOMED() {
		if (getSAB().equals("SNOMEDCT")) {
			return true;
		} else {
			return false;
		}
	}

	public String getSUPPRESS() {
		return SUPPRESS;
	}

	public void setSUPPRESS(String sUPPRESS) {
		SUPPRESS = sUPPRESS;
	}

	public void setLAT(String lAT) {
	}

	public void setTS(String tS) {
	}

	public void setLUI(String lUI) {
	}

	public void setSTT(String sTT) {
	}

	public void setSUI(String sUI) {
	}

	public void setISPREF(String iSPREF) {
	}

	public void setAUI(String aUI) {
	}

	public void setSAUI(String sAUI) {
	}

	public void setSCUI(String sCUI) {
	}

	public void setSDUI(String sDUI) {
	}

	public void setTTY(String tTY) {
	}

	public void setSTR(String sTR) {
	}

	public void setSRL(String sRL) {
	}

	public void setCVF(String cVF) {
	}

}
